import os

from flask import Flask

from controller.index import index
from controller.index2 import index2
from controller.index3 import index3
from controller.index4 import index4
from controller.index5 import index5
from controller.index6 import index6
from controller.index7 import index7

app = Flask(__name__, template_folder='template', static_url_path='/', static_folder='resource')

app.config['SECRET_KEY'] = os.urandom(24)
app.register_blueprint(index)
app.register_blueprint(index2)
app.register_blueprint(index3)
app.register_blueprint(index4)
app.register_blueprint(index5)
app.register_blueprint(index6)
app.register_blueprint(index7)


@app.template_filter('add')
def add(input):
    return input + 1


def add2(a, b):
    return a + b


app.jinja_env.globals.update(myadd=add2)

if __name__ == '__main__':
    app.run(debug=True)
